function cbChange() {
  localStorage.autoRenew = cbAutoRenew.checked;
}
function selChange() {
  localStorage.library = selLibrary.value;
}
var ls = localStorage.autoRenew;
var lib = localStorage.library;
if(lib)selLibrary.value = lib;
if(cbAutoRenew)cbAutoRenew.checked = (typeof(ls)=="string")? JSON.parse(ls) : false;